module pe {
/** * PE file headers and data. * This object doesn't know how to read PE files, it merely represents the content. */export class PEFile {
/** * DOS header starts from physical offset 0 in the file. * First two bytes of DOS header form classic MZ signature in ASCII code. * The values in DOS header's fields carry no particular meaning in the modern PE format. */dosHeader: pe.headers.DosHeader = null;
/** * By convention, this stretch of bytes contains a small program in x86 16-bit assembler* printing a dummy message 'this program cannot run in DOS mode'.
*/dosStub: Uint8Array = null;
/** * Contains old-style timestamp, machine architecture enum and several values used to reference and parse other parts of PE file. */peHeader: pe.headers.PEHeader = null;
/** * Not optional anymore in modern environment, this structure contains 32/64 bitness flag, several version fields * and references to data directories, structures in PE file containing specific predefined data. * For example, data directory at index 14 refers to .NET metadata. */optionalHeader: pe.headers.OptionalHeader = null;
/** * Sections control physical/virtual mapping between PE file on disk and its expected layout in memory. * Apart from relocation offsets/sizes, section headers contain sybolic names and various flags related to sections. */sectionHeaders: pe.headers.SectionHeader[] = null;
constructor(public path: string) {
}
}
}